#include "Type.hpp"

#include "Utils/Logging.h"

std::string wallpaper::ToString(const ImageType& type) {
#define IMG(str) \
    case ImageType::str: return #str;

    switch (type) {
        IMG(UNKNOWN);
        IMG(BMP);
        IMG(ICO);
        IMG(JPEG);
        IMG(JNG);
        IMG(PNG);
    default: LOG_ERROR("Not valied image type: %d", (int)type); return "";
    }
}

std::string wallpaper::ToString(const TextureFormat& format) {
#define Fmt(str) \
    case TextureFormat::str: return #str;

    switch (format) {
        Fmt(RGBA8);
        Fmt(BC1);
        Fmt(BC2);
        Fmt(BC3);
        Fmt(BC7);
        Fmt(RGB8);
        Fmt(RG8);
        Fmt(R8);
        Fmt(RGBA16F);
        Fmt(RG16F);
        Fmt(R16F);
        Fmt(R32F);
        Fmt(BC6H);
        Fmt(RGB565);
        Fmt(RGBA1010102);
    default: LOG_ERROR("Not valied tex format: %d", (int)format); return "";
    }
}
